package com.ruoyi.biz.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.biz.mapper.BizGoodsCategoryStrategyMapper;
import com.ruoyi.biz.domain.BizGoodsCategoryStrategy;
import com.ruoyi.biz.service.IBizGoodsCategoryStrategyService;

/**
 * 商品类别价格策略信息Service业务层处理
 * 
 * @author tds
 * @date 2022-11-10
 */
@Service
public class BizGoodsCategoryStrategyServiceImpl implements IBizGoodsCategoryStrategyService 
{
    @Autowired
    private BizGoodsCategoryStrategyMapper bizGoodsCategoryStrategyMapper;

    /**
     * 查询商品类别价格策略信息
     * 
     * @param strategyId 商品类别价格策略信息主键
     * @return 商品类别价格策略信息
     */
    @Override
    public BizGoodsCategoryStrategy selectBizGoodsCategoryStrategyByStrategyId(Long strategyId)
    {
        return bizGoodsCategoryStrategyMapper.selectBizGoodsCategoryStrategyByStrategyId(strategyId);
    }

    /**
     * 查询商品类别价格策略信息列表
     * 
     * @param bizGoodsCategoryStrategy 商品类别价格策略信息
     * @return 商品类别价格策略信息
     */
    @Override
    public List<BizGoodsCategoryStrategy> selectBizGoodsCategoryStrategyList(BizGoodsCategoryStrategy bizGoodsCategoryStrategy)
    {
        return bizGoodsCategoryStrategyMapper.selectBizGoodsCategoryStrategyList(bizGoodsCategoryStrategy);
    }

    /**
     * 新增商品类别价格策略信息
     * 
     * @param bizGoodsCategoryStrategy 商品类别价格策略信息
     * @return 结果
     */
    @Override
    public int insertBizGoodsCategoryStrategy(BizGoodsCategoryStrategy bizGoodsCategoryStrategy)
    {
        bizGoodsCategoryStrategy.setCreateTime(DateUtils.getNowDate());
        return bizGoodsCategoryStrategyMapper.insertBizGoodsCategoryStrategy(bizGoodsCategoryStrategy);
    }

    /**
     * 修改商品类别价格策略信息
     * 
     * @param bizGoodsCategoryStrategy 商品类别价格策略信息
     * @return 结果
     */
    @Override
    public int updateBizGoodsCategoryStrategy(BizGoodsCategoryStrategy bizGoodsCategoryStrategy)
    {
        bizGoodsCategoryStrategy.setUpdateTime(DateUtils.getNowDate());
        return bizGoodsCategoryStrategyMapper.updateBizGoodsCategoryStrategy(bizGoodsCategoryStrategy);
    }

    /**
     * 批量删除商品类别价格策略信息
     * 
     * @param strategyIds 需要删除的商品类别价格策略信息主键
     * @return 结果
     */
    @Override
    public int deleteBizGoodsCategoryStrategyByStrategyIds(Long[] strategyIds)
    {
        return bizGoodsCategoryStrategyMapper.deleteBizGoodsCategoryStrategyByStrategyIds(strategyIds);
    }

    /**
     * 删除商品类别价格策略信息信息
     * 
     * @param strategyId 商品类别价格策略信息主键
     * @return 结果
     */
    @Override
    public int deleteBizGoodsCategoryStrategyByStrategyId(Long strategyId)
    {
        return bizGoodsCategoryStrategyMapper.deleteBizGoodsCategoryStrategyByStrategyId(strategyId);
    }
}
